<template>
  <view class="box edu">
    <view class="box-title">教育经历</view>
    <view
      class="box-item"
      v-for="eduItem in personEdusArr"
      :key="eduItem.edusId"
    >
      <view class="item-title">
        <text class="icon icon-school"></text>
        <text>{{ eduItem.school }}</text>
      </view>
      <view class="edu-info">
        <view class="edu-info-left">
          <text> {{ eduItem.eduId | eduFilter }}</text>
          <!-- <text><text class="divide">|</text>统招</text> -->
          <text><text class="divide">|</text>{{ eduItem.zym }}</text>
        </view>

        <view class="edu-info-right">
          <text>{{ eduItem.startdate }}-{{ eduItem.stopdate || "至今" }}</text>
        </view>
      </view>
      <view class="des">
        <text></text>
      </view>
    </view>
  </view>
</template>

<script>
import { eduList } from '@/utils/data';

export default {
  props: {
    personEdusArr: {
      type: Array,
      default: () => [],
    },
  },
  filters: {
    eduFilter(val) {
      let item = eduList.find(ele => {
        return ele.value == val
      })
      return item.label
    }
  },
};
</script>

<style lang="scss" scoped>
$img-base-resume: $img-base + "resume/";
.item-title {
  margin-bottom: $uni-spacing-col-lg;
  font-size: $uni-font-size-base;
  font-weight: bold;
  color: $uni-text-color-333;
}
.box {
  margin-bottom: $uni-spacing-col-big;
  padding: $uni-spacing-col-big;
  background-color: $uni-bg-color;
  border-radius: $uni-border-radius-lg;
  &-title {
    margin-bottom: $uni-spacing-col-lg;
    font-size: $uni-font-size-lg;
    font-weight: bold;
    color: #333333;
  }
  .icon {
    width: 36rpx;
    height: 36rpx;
    vertical-align: bottom;
  }
}
.edu {
  &-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: $uni-spacing-col-lg;
    font-size: $uni-font-size-sm;
    &-left {
      color: $uni-text-color-333;
    }
    &-right {
      flex-shrink: 0;
      margin-left: 10rpx;
      color: $uni-text-color-999;
    }
  }
  .icon-school {
    background-image: url($img-base-resume + 'school.png');
  }
}
</style>